﻿using MyToApp.Common;
using Prism.Mvvm;
using System.Collections.ObjectModel;
using System.Diagnostics.Metrics;

namespace MyToApp.ViewModels
{
    public class MainWindowViewModel : BindableBase
    {
        private string _title = "Prism Application";
        public string Title
        {
            get { return _title; }
            set { SetProperty(ref _title, value); }
        }
        /// <summary>
        ///  监听菜单集合
        /// </summary>
        private ObservableCollection<MenuItem> menuItems;
        public ObservableCollection<MenuItem> MenuItems {
            get { return menuItems; }
            set { SetProperty(ref menuItems, value);}
        }

        /// <summary>
        /// 生成菜单列表
        /// </summary>
        public MainWindowViewModel()
        {
            MenuItems= new ObservableCollection<MenuItem>();
            MenuItems.Add(new MenuItem() { Icon = "\xe635", BackColor = "#FF3E8E6C", Name = "我的一天", Count = 2 });
            MenuItems.Add(new MenuItem() { Icon = "\xe6b6", BackColor = "#FFAC395D", Name = "重要", Count = 2 });
            MenuItems.Add(new MenuItem() { Icon = "\xe6e1", BackColor = "#FF3E8E6C", Name = "已计划日程", Count = 2 });
            MenuItems.Add(new MenuItem() { Icon = "\xe614", BackColor = "#FFAC395D", Name = "已分配给你", Count = 2 });
            MenuItems.Add(new MenuItem() { Icon = "\xe755", BackColor = "#FF3E8E6C", Name = "任务", Count = 2 });
        }
    }
}
